|
Pollard's rho algorithm for logarithms is an algorithm introduced by John Pollard in 1978 to solve the discrete logarithm problem, analogous to Pollard's rho algorithm to solve the integer factorization problem. The goal is to compute such that , where belongs to a cyclic group generated by . The algorithm computes integers , , , and such that . Assuming, for simplicity, that the underlying group is cyclic of order , we can calculate as a solution of the equation . To find the needed , , , and the algorithm uses Floyd's cycle-finding algorithm to find a cycle in the sequence , where the function is assumed to be random-looking and thus is likely to enter into a loop after approximately steps. One way to define such a function is to use the following rules: Divide into three disjoint subsets of approximately equal size: , , and . If is in then double both and ; if then increment , if then increment . ==Algorithm== Let be a cyclic group of order , and given , and a partition , let be a map and define maps and by :Inputs ''a'': a generator of ''G'', ''b'': an element of ''G'' :Output An integer ''x'' such that ''ax = b'', or failure :# Initialise ''a0'' ← 0 :#::''b0'' ← 0 :#::''x0'' ← 1 ∈ ''G'' :#::''i'' ← 1 :# ''xi'' ← ''f(xi-1)'', ''ai'' ← ''g(xi-1,ai-1)'', ''bi'' ← ''h(xi-1,bi-1)'' :#''x2i'' ← ''f(f(x2i-2))'', ''a2i'' ← ''g(f(x2i-2),g(x2i-2,a2i-2))'', ''b2i'' ← ''h(f(x2i-2),h(x2i-2,b2i-2))'' :# If ''xi'' = ''x2i'' then :## ''r'' ← ''bi'' - ''b2i'' :## If r = 0 return failure :## x ← ''r -1 ''(''a2i'' - ''ai'') mod ''p'' :## return x :# If ''xi'' ≠ ''x2i'' then ''i'' ← ''i+1'', and go to step 2. 抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)』 ■ウィキペディアで「Pollard's rho algorithm for logarithms」の詳細全文を読む スポンサード リンク
|